package com.example.chat.model;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @author ：YaXing
 * @description：角色表
 * @date ：2022/3/24 10:40
 */
@Entity
@Table(name = "VDOA005_ROLE")
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@DynamicInsert
@DynamicUpdate
@NoArgsConstructor
public class Role extends BaseEntity implements Serializable {

    private static final long serialVersionUID = -1432176987131347676L;
    @Comment(value="主键")
    @Id
    @Column(name = "DOA005_ID", length = 50)
    private String id;

    @Comment(value="角色名称")
    @Column(name = "DOA005_NAME", length = 50,unique = true)
    private String name;

    @Comment(value="是否删除")
    @Column(name = "DOA005_DELETED")
    private Boolean deleted = false;
}
